package com.ykj.controller;

import com.ykj.dto.Result;
import com.ykj.entity.User;
import com.ykj.utils.RequestUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class TestController {


    @GetMapping("/test")
    public Result test(HttpServletRequest request){
        return Result.ok(RequestUtils.getRealIp(request));
    }



}
